package com.mg.plugin.drought.common;

import com.mg.model.Model;
import com.mg.plugin.drought.entity.StationData;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

public class RelativeHumidityIndexCalculator {
    /**
     * 计算CWDIa
     *
     * @param stationData 实况值
     * @param model       模型
     * @return
     */
    public static double calcEHI(List<StationData> stationData, Model model) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Calendar calendar = Calendar.getInstance();
        return PenmamCalculator.caleRHI(stationData, calendar, sdf, model);
    }

}
